import { PartialType, OmitType } from '@nestjs/swagger';
import { CreateRoleDto } from './create-role.dto';
import { IntersectionType } from '@nestjs/mapped-types';
import { NewsPaginationParams } from '../../agent_manag/dto/update-agent_manag.dto';

export class UpdateRoleDto extends PartialType(CreateRoleDto) {}

export class FindAllDto extends PartialType(
  OmitType(CreateRoleDto, ['permissionIds']),
) {}

// 合并两个 DTO 的属性和校验规则
export class MergedRoleQueryDto extends IntersectionType(
  NewsPaginationParams,
  FindAllDto,
) {}
